<?php
namespace Tlf\BigDb\Test\Orm;
class Person extends \Tlf\BigFormOrm {
public int $id;
protected array $form_data = [];
public function set_from_form(array $row, mixed $form_id=null){
$this->form_data = $row;
}
public function set_from_db(array $row, mixed $form_id=null){
$this->id = $row['id'];
$this->form_data = $row;
ksort($this->form_data);
}
public function get_db_row(): array{
return $this->form_data;
}
public function onDidSave(array $row){
$this->form_data['id'] = $this->id;
ksort($this->form_data);
}
}